<?php
/**
 * TOP API: alibaba.aliqin.trade.create request
 * 
 * @author auto create
 * @since 1.0, 2016.12.29
 */
class AlibabaAliqinTradeCreateRequest
{
	/** 
	 * 订单扩展属性
	 **/
	private $exProperty;
	
	/** 
	 * 生成的token有效期，至少大于5分钟
	 **/
	private $expiryDate;
	
	/** 
	 * 商品ID
	 **/
	private $itemId;
	
	/** 
	 * 运营商外部订单号
	 **/
	private $merchantOrderId;
	
	/** 
	 * 买家混淆user ID
	 **/
	private $mixUserId;
	
	/** 
	 * 无线开放插件ID
	 **/
	private $pluginInstanceId;
	
	/** 
	 * 总价格，可支持两位小数，单位（元）
	 **/
	private $totalPrice;
	
	private $apiParas = array();
	
	public function setExProperty($exProperty)
	{
		$this->exProperty = $exProperty;
		$this->apiParas["ex_property"] = $exProperty;
	}

	public function getExProperty()
	{
		return $this->exProperty;
	}

	public function setExpiryDate($expiryDate)
	{
		$this->expiryDate = $expiryDate;
		$this->apiParas["expiry_date"] = $expiryDate;
	}

	public function getExpiryDate()
	{
		return $this->expiryDate;
	}

	public function setItemId($itemId)
	{
		$this->itemId = $itemId;
		$this->apiParas["item_id"] = $itemId;
	}

	public function getItemId()
	{
		return $this->itemId;
	}

	public function setMerchantOrderId($merchantOrderId)
	{
		$this->merchantOrderId = $merchantOrderId;
		$this->apiParas["merchant_order_id"] = $merchantOrderId;
	}

	public function getMerchantOrderId()
	{
		return $this->merchantOrderId;
	}

	public function setMixUserId($mixUserId)
	{
		$this->mixUserId = $mixUserId;
		$this->apiParas["mix_user_id"] = $mixUserId;
	}

	public function getMixUserId()
	{
		return $this->mixUserId;
	}

	public function setPluginInstanceId($pluginInstanceId)
	{
		$this->pluginInstanceId = $pluginInstanceId;
		$this->apiParas["plugin_instance_id"] = $pluginInstanceId;
	}

	public function getPluginInstanceId()
	{
		return $this->pluginInstanceId;
	}

	public function setTotalPrice($totalPrice)
	{
		$this->totalPrice = $totalPrice;
		$this->apiParas["total_price"] = $totalPrice;
	}

	public function getTotalPrice()
	{
		return $this->totalPrice;
	}

	public function getApiMethodName()
	{
		return "alibaba.aliqin.trade.create";
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}
	
	public function check()
	{
		
		RequestCheckUtil::checkNotNull($this->itemId,"itemId");
		RequestCheckUtil::checkNotNull($this->merchantOrderId,"merchantOrderId");
		RequestCheckUtil::checkNotNull($this->mixUserId,"mixUserId");
		RequestCheckUtil::checkNotNull($this->pluginInstanceId,"pluginInstanceId");
		RequestCheckUtil::checkNotNull($this->totalPrice,"totalPrice");
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
